package com.coc.ofmylistener.event.support;

import com.coc.ofmylistener.event.EventHandler;
import com.coc.ofmylistener.event.EventHandlerManager;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

public class SimpleEventHandlerManager implements EventHandlerManager {

    private Set<EventHandler> eventHandlers = new HashSet<EventHandler>();

    @Override
    public void regsiter(EventHandler handler) {
        eventHandlers.add(handler);
    }

    @Override
    public void remove(EventHandler handler) {
        eventHandlers.remove(handler);
    }

    @Override
    public Collection<EventHandler> getHandlers() {
        return eventHandlers;
    }

}
